<html>

<head>

<title>Listings Page</title>
</head>

<body>
<div class="listings-container">
	<div class="refine-search-results">
    	<div class="refine-search-by">
        	Refine Search by
        </div>
        <div class="refine-search-options">
        	
              <%(@sub_category_fields).each do |field_value| -%>

               <%if field_value[:label] !='Basic Qualification' && field_value[:label] !='Job Role'%>
              <div class="refine-search-category">
              <%=field_value[:label] -%>
              </div>
              <div class="refine-search-filters">

                <%=(field_value[:input_type][2].gsub("<option>","").gsub("</option>","<hr color='#FFFCED' size='1' style='padding:0px;margin-top: 1px;'>").gsub("/"," / "))-%>
                
              
                 
              </div>
              <%end -%>
            <%end -%>
    	</div>
    </div>
    <div class="listings-center-column">
        <div class="listings-search">
        	<div class="listings-search-title">
            	Find <%= h @category.name %>
            </div>
            <div class="search-field-one">
            	<div class="search-field-name">
                	Looking for
                </div>
                <div class="search-field-input">
                	<select>
                        <option value="1">Full time job</option>
                        <option value="2">Part time job</option>
                        <option value="3">Internship</option>
                        <option value="4">Voluntary Services</option>
                        <option value="5">Freelancing</option>
                    </select>
                </div>
            </div>
            <div class="search-field-two">
            	<div class="search-field-name">
                	Keyword
                </div>
                <div class="search-field-input">
                	<input type="text" size="26" maxlength="40" class="input-boxes" value="IT, Developer, Finance etc."/>
                </div>
            </div>
            <div class="search-field-three">
            	<div class="search-field-name">
                	Locations
                </div>
                <div class="search-field-input">
                	<input type="text" size="26" maxlength="40" class="input-boxes" value="Delhi, Mumbai"/>
                </div>
            </div>
            <div class="listings-search-button">
              <%=image_tag("listings-search.jpg",:width=>"75px",:height=>"20px",:border=>"0px") -%>
           
            </div>
    	</div>
    	<div class="sort-listings">
        	<div class="total-results-count">
              <%if !params[:page].nil?
              a=params[:page].to_i
                b=10
                c=a*b
              else
                c=10
                a=1
              end
              -%>
              <%=a -%> - <%=c-%>  out of <%=@total_ads -%>
            </div>
            <div class="page-navigator"><%= will_paginate @advertisments -%></div>
            <div class="sort-by">
            	<div class="sort-by-name">
                	Sort by:&nbsp;
                </div>
                <div class="sort-by-options">
                	<select>
                        <option value="1">By Date</option>
                        <option value="2">By Relevance</option>
                    </select>
               </div>
            </div>
    	</div>
    	<div class="listings-search-results">
        	<div class="sponsored-ad-container">
            	<div class="listings-ad-title">
                	<a href="">Business Analyst / Business Development Executive for Xicom Technologies Ltd.</a>
                </div>
                <div class="ad-posted-fields">
                	<div class="ad-category-details">
						<a href="">Job openings / Full time</a>
                    </div>
                	<div class="listings-posted-details">
                    	<div class="listings-posted-text">
                        	Posted on:&nbsp;
                        </div>
                        <div class="listings-posted-value">
                        	26 April, 2009
                        </div>
                    </div>
                  	<div class="listings-posted-details">
                    	<div class="listings-posted-text">
                        	Posted by:&nbsp;
                        </div>
                        <div class="listings-posted-value">
                        	<a href="">Naukri.com</a>
                        </div>
                    </div>
                </div>
                <div class="listings-ad-fields">
                	<div class="listings-ad-field-one">
                    	<div class="ad-fields-name">
                        	Location:&nbsp;
                        </div>
                        <div class="ad-fields-value">
                        	Ashok Vihar, Janakpuri, Delhi
                        </div>
                    </div>
                	<div class="listings-ad-field-one">
                    	<div class="ad-fields-name">
                        	Company:&nbsp;
                        </div>
                        <div class="ad-fields-value">
                        	HCL Technologies
                        </div>
                    </div>
                	<div class="listings-ad-field-one">
                    	<div class="ad-fields-name">
                        	Industry:&nbsp;
                        </div>
                        <div class="ad-fields-value">
                        	IT Softwares/Software services
                        </div>
                    </div>
                </div>
                <div class="listings-ad-description-sponsored">
                	Currently we are looking for MBA Summer Trainees in sales & marketing research. They would be assigned a couple of sales & research project for 2 months. Good knowledge of Marketing Excellent Communication Skills Internate Friendly...
                    <a href="">More</a>
                     <%=link_to image_tag("read-more.jpg", :width=>"6px", :height=>"7px",:border=>"0px"), :controller=> "advertisments" , :action=>"show" ,:id => 'ad' -%>

                 </div>
                 <div class="listings-ad-image">
                 	<%=image_tag "company-logo.jpg", :width=>"80",:height=>"80" -%>
                 </div>
                 <div class="listings-contact-advertiser">
                 	 <%=image_tag "contact-advertiser.jpg", :width=>"156",:height=>"28" -%>
                 </div>
                 <div class="save-similar-links">
                 	<a href="">Save Ad</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="">View Similar Ads</a>
                 </div>
            </div>

<%require 'htmlentities'
coder = HTMLEntities.new
%>
            <% @advertisments.each do |ad| %>
        	<div class="listings-ad-container">
            	<div class="listings-ad-title">
                	<%=link_to h(coder.decode(ad.title.capitalize)), { :controller=> "advertisments" , :action=>"show" ,:id => ad} -%>
                </div>
                
                <div class="ad-posted-fields">
                	<div class="ad-category-details">
						<a href="">Job openings / Full time</a>
                    </div>
                	<div class="listings-posted-details">
                    	<div class="listings-posted-text">
                        	Posted on:&nbsp;
                        </div>
                        <div class="listings-posted-value">
                        	<%=h ad.created_at.to_formatted_s(:long_ordinal) -%>
                        </div>
                    </div>
                  	<div class="listings-posted-details">
                    	<div class="listings-posted-text">
                        	Posted by:&nbsp;
                        </div>
                        <div class="listings-posted-value">
                        	<a href=""><%#=h coder.decode(ad.full_name.capitalize)unless ad.full_name.nil? -%></a>
                        </div>
                    </div>
                </div>
                <div class="listings-ad-fields">
                	<div class="listings-ad-field-one">
                    	<div class="ad-fields-name">
                        	Location:&nbsp;
                        </div>
                        <div class="ad-fields-value">
                        	<%=h ad.location -%>
                        </div>
                    </div>
                	<div class="listings-ad-field-one">
                    	<div class="ad-fields-name">
                        	Company:&nbsp;
                        </div>
                        <div class="ad-fields-value">
                        	HCL Technologies
                        </div>
                    </div>
                	<div class="listings-ad-field-one">
                    	<div class="ad-fields-name">
                        	Industry:&nbsp;
                        </div>
                        <div class="ad-fields-value">
                        	IT Softwares/Software services
                        </div>
                    </div>
                </div>
                <div class="listings-ad-description">
                
                <%=h coder.decode(excerpt(ad.description.capitalize  , ' ', 300))unless ad.description.nil? -%>
             
                <%=link_to "More", { :controller=> "advertisments" , :action=>"show" ,:id => ad} -%>
                <%=link_to image_tag("read-more.jpg", :width=>"6px", :height=>"7px",:border=>"0px"), :controller=> "advertisments" , :action=>"show" ,:id => ad -%>
               
                 </div>
                 <div class="listings-contact-advertiser">
                   <%=image_tag("contact-advertiser.jpg", :width=>"156px", :height=>"28px",:border=>"0px")%>
                 	
                 </div>
                 <div class="save-similar-links">
                 	<a href="">Save Ad</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="">View Similar Ads</a> <hr size="1" color="#cccccc">
                 </div>
            </div>
            <hr size="1" color="#cccccc">
            <%end -%>
		</div>
	</div>
    <div class="listings-right-column">
    	<div class="post-a-free-ad">
 	       Post a Free Ad
        </div>
    	<div class="subscribe-email">
 	       Subscribe Email
        </div>
        <div class="google-adsense">
          <%=image_tag("google-adsense.jpg",:width=>"150px",:height=>"562px",:border=>"0px") -%>
        
        </div>
    </div>
</div>
</body>
</html>
